package com.daigoudao.web.service;

import java.util.List;

import com.daigoudao.web.model.FollowModel;
import com.daigoudao.web.model.UserAreaModel;
import com.daigoudao.web.model.UserCategoryModel;
import com.daigoudao.web.model.UserModel;

public interface IUserService {
	
	public List<UserModel> getHotBrokerList(UserModel userModel) throws Exception;
	
	public List<UserModel> getHotBrokerLista(UserModel userModel) throws Exception;
	
	public boolean saveFollower(FollowModel follow) throws Exception;
	
	public boolean delFollower(FollowModel follow) throws Exception;
	
	public int getBrokerCount(UserModel userModel) throws Exception;
	
	public List<UserModel> getBrokerList(UserModel userModel) throws Exception;
	
	public List<UserModel> getBrokerLista(UserModel userModel) throws Exception;
	
	public List<UserModel> getFollowList(UserModel user) throws Exception;
	
	public void deleteFollow(int followid) throws Exception;
	
	public UserModel saveUser(UserModel userModel) throws Exception;
	
	public UserModel getUserBaseInfoByID(int userid);
	
	public boolean getSameEmail(String email) throws Exception;
	
	public UserModel getUserLogin(UserModel userModel) throws Exception;
	
	public boolean updateUserLogin(UserModel user) throws Exception;
	
	/**
	 * 更新用户密码
	 * @param userid
	 * @param oldPasswd
	 * @param newPasswd
	 * @return -1 表示原密码错误   1  表示更新失败  0 表示更新成功
	 */
	public int updateUserPasswd(int userid ,String oldPasswd,String newPasswd);
	
	public void updateUserInfo(UserModel userModel);
	
	public boolean updateUserByEmail(UserModel userModel) throws Exception;
	
	public UserModel getBrokerDetail(FollowModel follow) throws Exception;
	
	public boolean getFollowCountByUserId(FollowModel follow) throws Exception;
	
	public int getCheckUserPwd(UserModel userModel) throws Exception;
	
	public boolean updateUserPwd(UserModel userModel) throws Exception;
	
	public boolean updateBrokerScore() throws Exception;
	
	public List<UserAreaModel> getUserAreaList(int userid);
	
	public void updateUserAreaList(int userid,int[] list);
	
	public List<UserCategoryModel> getUserCategoryList(int userid);
	
	public void updateUserCategoryList(int userid,int[] list);
	
}
